<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('企业用户信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>用户名/账号：</label>
                                <input type="text" name="userName"/>
                            </li>
                            <li>
                                <label>密码：</label>
                                <input type="text" name="password"/>
                            </li>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="realName"/>
                            </li>
                            <li>
                                <label>乡镇账号：所属乡镇：</label>
                                <input type="text" name="town"/>
                            </li>
                            <li>
                                <label>手机号：</label>
                                <input type="text" name="mobile"/>
                            </li>
                            <li>
                                <label>县级账号：政务单位名称：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>统代：</label>
                                <input type="text" name="creditCode"/>
                            </li>
                            <li>
                                <label>职位：</label>
                                <input type="text" name="position"/>
                            </li>
                            <li>
                                <label>角色id：</label>
                                <input type="text" name="roleId"/>
                            </li>
                            <li>
                                <label>0为首次 1为不是首次登录：</label>
                                <input type="text" name="firstLogin"/>
                            </li>
                            <li>
                                <label>单位级别：</label>
                                <input type="text" name="unitLevel"/>
                            </li>
                            <li>
                                <label>最后登录时间：</label>
                                <input type="text" class="time-input" placeholder="请选择最后登录时间" name="lastLoginTime"/>
                            </li>
                            <li>
                                <label>oss图片：</label>
                                <input type="text" name="ossUrl"/>
                            </li>
                            <li>
                                <label>是否是管理员:0-否,1-是：</label>
                                <input type="text" name="isAdmin"/>
                            </li>
                            <li>
                                <label>钉钉userId：</label>
                                <input type="text" name="dingUserId"/>
                            </li>
                            <li>
                                <label>是否审核：</label>
                                <input type="text" name="isChecked"/>
                            </li>
                            <li>
                                <label>组织架构id：</label>
                                <input type="text" name="organizationId"/>
                            </li>
                            <li>
                                <label>企业名称：</label>
                                <input type="text" name="entName"/>
                            </li>
                            <li>
                                <label>邮箱：</label>
                                <input type="text" name="mail"/>
                            </li>
                            <li>
                                <label>法人名称：</label>
                                <input type="text" name="frName"/>
                            </li>
                            <li>
                                <label>联系人：</label>
                                <input type="text" name="contactName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="ent:user:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="ent:user:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="ent:user:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="ent:user:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('ent:user:edit')}]];
        var removeFlag = [[${@permission.hasPermi('ent:user:remove')}]];
        var prefix = ctx + "ent/user";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "企业用户信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '编号',
                    visible: false
                },
                {
                    field: 'userName',
                    title: '用户名/账号'
                },
                {
                    field: 'password',
                    title: '密码'
                },
                {
                    field: 'realName',
                    title: '姓名'
                },
                {
                    field: 'town',
                    title: '乡镇账号：所属乡镇'
                },
                {
                    field: 'mobile',
                    title: '手机号'
                },
                {
                    field: 'name',
                    title: '县级账号：政务单位名称'
                },
                {
                    field: 'creditCode',
                    title: '统代'
                },
                {
                    field: 'position',
                    title: '职位'
                },
                {
                    field: 'roleId',
                    title: '角色id'
                },
                {
                    field: 'status',
                    title: '状态:1可用,0禁用'
                },
                {
                    field: 'firstLogin',
                    title: '0为首次 1为不是首次登录'
                },
                {
                    field: 'unitLevel',
                    title: '单位级别'
                },
                {
                    field: 'lastLoginTime',
                    title: '最后登录时间'
                },
                {
                    field: 'ossUrl',
                    title: 'oss图片'
                },
                {
                    field: 'isAdmin',
                    title: '是否是管理员:0-否,1-是'
                },
                {
                    field: 'dingUserId',
                    title: '钉钉userId'
                },
                {
                    field: 'isChecked',
                    title: '是否审核'
                },
                {
                    field: 'organizationId',
                    title: '组织架构id'
                },
                {
                    field: 'entName',
                    title: '企业名称'
                },
                {
                    field: 'mail',
                    title: '邮箱'
                },
                {
                    field: 'frName',
                    title: '法人名称'
                },
                {
                    field: 'contactName',
                    title: '联系人'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>